Skip to content

fix(navigation): preserve user transitions across directional navigation#11

Merged
chiefcll merged 1 commit into
mainfrom
fix/row-transitions
May 14, 2026
Merged

fix(navigation): preserve user transitions across directional navigation#11
chiefcll merged 1 commit into
mainfrom
fix/row-transitions

Conversation

@chiefcll
Copy link
Copy Markdown
Contributor

Summary

  • handleNavigation now snapshots the developer-supplied transition and merges as { ...directional, ...base } so user-supplied keys (e.g. a custom transition.x duration) survive every keypress instead of being clobbered by defaultTransitionBack/Forward/Up/Down. The snapshot is re-taken whenever el.transition is set externally, so reactive updates still flow through.
  • Drop the empty transition={/* @once */ {}} default from Row, Column, and Virtual. That default made this.transition non-undefined before elementNode's style setter ran, which caused the setter to skip style.transition entirely (elementNode.ts:1141-1145). handleNavigation already tolerates an undefined el.transition, so the default isn't load-bearing.

Fixes #8

Test plan

  • npm run tsc — clean
  • npm test — 120/120 passing
  • Verify in a sample app: setting transition={{ x: { duration: 500 } }} on a Row keeps that duration after pressing left/right
  • Verify style={{ transition: { x: {...} } }} on a Row is now honored

🤖 Generated with Claude Code

handleNavigation merged directional transitions on top of el.transition,
silently clobbering any developer-supplied transition keys. The empty
`transition={/* @once */ {}}` default on Row/Column/Virtual also blocked
style-defined transitions because elementNode's style setter skips keys
that are already defined on the node.

- handleNavigation now snapshots the developer's base transition and
  merges as `{ ...directional, ...base }` so user-supplied keys win.
  Re-snapshots when el.transition is changed externally (reactive update).
- Drop empty `transition={{}}` defaults from Row, Column, and Virtual so
  `style.transition` flows through.

Fixes #8

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@chiefcll chiefcll merged commit 76baf4b into main May 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

row transitions

1 participant